import './index.scss';
import React, { FC, ReactElement } from 'react';
import { Link } from 'react-router-dom';

interface IProps{
  headerTitle: string;
  iconShow: boolean;
}

const Header: FC<IProps> = ({
  headerTitle,
  iconShow
}): ReactElement => {
  return (
    <div className="header">
      <div className="back-icon">
        {
          iconShow &&
          <Link to="/" className='iconfont icon-arrow-left'></Link>
        }
      </div>
      <h1>{headerTitle}</h1>
    </div>
  );
}

export default Header;